﻿import request from "@/utils/axios";

// 应用配置(服务)分页查询接口
export function serviceProviderList(data) {
  return request.post("/third-backend/serviceProvider/page", data);
}

// 新增应用配置
export function serviceProviderAdd(data) {
  return request.post("third-backend/serviceProvider/add", data);
}

// 编辑应用配置
export function serviceProviderUpdate(data) {
  return request.post("/third-backend/serviceProvider/update", data);
}
// 改变应用配置状态
export function serviceProviderEnable(data) {
  return request.post("/third-backend/tenantServiceConfig/enable", data);
}

// 应用类别字典
export function primaryList(params) {
  return request.get("/third-backend/apiCategory/primaryList", { params });
}
// 应用类型字典
export function serviceProviderTypeList(params) {
  return request.get("/third-backend/serviceProvider/typeList", { params });
}
// 应用(服务)租户(品牌)分页查询
export function servicePage(data) {
  return request.post(`/third-backend/tenantServiceConfig/page/${data.id}`, data);
}
// 编辑应用
export function serviceUpdate(data) {
  return request.post("/third-backend/tenantServiceConfig/update", data);
}
// 开通应用
export function serviceAdd(data) {
  return request.post("/third-backend/tenantServiceConfig/add", data);
}
// 编辑平台型应用
export function serviceTariff(data) {
  return request.post("/third-backend/tenantServiceConfig/update/tariff", data);
}
// 短信开通
export function serviceAddSms(data) {
  return request.post("/third-backend/tenantServiceConfig/add/sms", data);
}
// 编辑短信
export function serviceUpdateSms(data) {
  return request.post("/third-backend/tenantServiceConfig/update/sms", data);
}
// 短信套餐编辑
export function serviceAddOrUpdate(data) {
  return request.post("/third-backend/serviceProvider/sms/addOrUpdate", data);
}
// 短信套餐类型
export function smsTypeList(params) {
  return request.get("/third-backend/serviceProvider/sms/typeList", { params });
}
// 短信套餐列表
export function smsList(params) {
  return request.get("/third-backend/serviceProvider/sms/list", { params });
}
// 根据tenantId查询客户详情
export function getCustomerByTenantId(params) {
  return request.get("/support-backend/customer/getCustomerByTenantId", { params });
}
// 获取绑定租户(品牌)信息，比如参数-品牌型应用
export function bindInfo(params) {
  return request.get("/third-backend/tenantServiceConfig/bindInfo", { params });
}
// 应用(服务)租户(品牌)基础信息查询
export function basicsInfo(params) {
  console.log("🚀 ~ basicsInfo ~ params:", params);
  return request.get(`third-backend/tenantServiceConfig/basicsInfo/${params.id}`, { params });
}
